package com.lrkj.payfee.service.impl;

import java.util.List;
import com.lrkj.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lrkj.payfee.mapper.AdvicePaymentModeMapper;
import com.lrkj.payfee.domain.AdvicePaymentMode;
import com.lrkj.payfee.service.IAdvicePaymentModeService;

/**
 * 付款方式记录Service业务层处理
 *
 * @author yajun_ren
 * @date 2022-03-26
 */
@Service
public class AdvicePaymentModeServiceImpl implements IAdvicePaymentModeService
{
    @Autowired
    private AdvicePaymentModeMapper advicePaymentModeMapper;

    /**
     * 查询付款方式记录
     *
     * @param id 付款方式记录ID
     * @return 付款方式记录
     */
    @Override
    public AdvicePaymentMode selectAdvicePaymentModeById(String id)
    {
        return advicePaymentModeMapper.selectAdvicePaymentModeById(id);
    }

    /**
     * 查询付款方式记录列表
     *
     * @param advicePaymentMode 付款方式记录
     * @return 付款方式记录
     */
    @Override
    public List<AdvicePaymentMode> selectAdvicePaymentModeList(AdvicePaymentMode advicePaymentMode)
    {
        return advicePaymentModeMapper.selectAdvicePaymentModeList(advicePaymentMode);
    }

    /**
     * 新增付款方式记录
     *
     * @param advicePaymentMode 付款方式记录
     * @return 结果
     */
    @Override
    public int insertAdvicePaymentMode(AdvicePaymentMode advicePaymentMode)
    {
        advicePaymentMode.setCreateTime(DateUtils.getNowDate());
        return advicePaymentModeMapper.insertAdvicePaymentMode(advicePaymentMode);
    }

    /**
     * 修改付款方式记录
     *
     * @param advicePaymentMode 付款方式记录
     * @return 结果
     */
    @Override
    public int updateAdvicePaymentMode(AdvicePaymentMode advicePaymentMode)
    {
        return advicePaymentModeMapper.updateAdvicePaymentMode(advicePaymentMode);
    }

    /**
     * 批量删除付款方式记录
     *
     * @param ids 需要删除的付款方式记录ID
     * @return 结果
     */
    @Override
    public int deleteAdvicePaymentModeByIds(String[] ids)
    {
        return advicePaymentModeMapper.deleteAdvicePaymentModeByIds(ids);
    }

    /**
     * 删除付款方式记录信息
     *
     * @param id 付款方式记录ID
     * @return 结果
     */
    @Override
    public int deleteAdvicePaymentModeById(String id)
    {
        return advicePaymentModeMapper.deleteAdvicePaymentModeById(id);
    }
    /**
     * 批量新增付款方式记录信息
     *
     * @param advicePaymentModes 付款方式记录对象
     */
    public int batchAddData(List<AdvicePaymentMode> advicePaymentModes)
    {
           return advicePaymentModeMapper.batchAddData(advicePaymentModes);
    }
}
